<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: ProductIntegrationGenerator
  
    &mdash; Documentation by YARD 0.7.4
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (P)</a> &raquo; 
    
    
    <span class="title">ProductIntegrationGenerator</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: ProductIntegrationGenerator
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ProductIntegrationGenerator</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">pde_headless_product_integration_generator.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
产品集成表生成器
</p>


  </div>
</div>
<div class="tags">
  
<h3>Author:</h3>
<ul class="author">
  
    <li>
      
      
      
      
        
        <div class='inline'><p>
许祯
</p>
</div>
      
    </li>
  
</ul>

</div>
  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="Dir_name_features-classvariable" class="">@@Dir_name_features =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>features/</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
        <dt id="Dir_name_plugins-classvariable" class="">@@Dir_name_plugins =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>plugins/</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
        <dt id="Constants_int_svn_url-classvariable" class="">@@Constants_int_svn_url =
          
        </dt>
        <dd><pre class="code"><span class='int'>0</span></pre></dd>
      
        <dt id="Constants_int_revision-classvariable" class="">@@Constants_int_revision =
          
        </dt>
        <dd><pre class="code"><span class='int'>1</span></pre></dd>
      
        <dt id="Constants_int_plugin_name-classvariable" class="">@@Constants_int_plugin_name =
          
        </dt>
        <dd><pre class="code"><span class='int'>2</span></pre></dd>
      
        <dt id="Constants_int_plugin_version-classvariable" class="">@@Constants_int_plugin_version =
          
        </dt>
        <dd><pre class="code"><span class='int'>3</span></pre></dd>
      
    </dl>
  





  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#generete_from_build_info_after_build-class_method" title="generete_from_build_info_after_build (class method)">+ (Object) <strong>generete_from_build_info_after_build</strong>(sheet_filepath, build_directory, build_info) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
生成产品集成表.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#get_all_features-class_method" title="get_all_features (class method)">+ (Array) <strong>get_all_features</strong>(feature_dir, feature_ids) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
获取所有feature.xml文件路径.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#get_bundle_version-class_method" title="get_bundle_version (class method)">+ (String) <strong>get_bundle_version</strong>(plugin_file) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
获取METAFEST.MF中Bundle-Version版本.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#get_feature_require_plugins-class_method" title="get_feature_require_plugins (class method)">+ (Array) <strong>get_feature_require_plugins</strong>(build_directory, feature_id) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
获取feature所需要的plugin信息.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#parse_feature_files-class_method" title="parse_feature_files (class method)">+ (Hashmap) <strong>parse_feature_files</strong>(build_directory, build_info) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
解析build_info中的feature.xml，返回一个map,map的key是feature_id,value是这个feature包含的所有插件的PluginInfo.
</p>
</div></span>
  
</li>

      
    </ul>
  



  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="generete_from_build_info_after_build-class_method">
  
    + (<tt>Object</tt>) <strong>generete_from_build_info_after_build</strong>(sheet_filepath, build_directory, build_info) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
生成产品集成表
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>sheet_filepath</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
产品集成表文件路径
</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>build_directory</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
编译目录路径
</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>build_info</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="PDEHeadlessUtil/PDEHeadlessBuildInfo.html" title="PDEHeadlessUtil::PDEHeadlessBuildInfo (class)">PDEHeadlessBuildInfo</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
编译信息
</p>
</div>
      
    </li>
  
</ul>

<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt>TypeError</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'pde_headless_product_integration_generator.rb', line 28</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_generete_from_build_info_after_build'>generete_from_build_info_after_build</span><span class='lparen'>(</span> <span class='id identifier rubyid_sheet_filepath'>sheet_filepath</span><span class='comma'>,</span> <span class='id identifier rubyid_build_directory'>build_directory</span><span class='comma'>,</span> <span class='id identifier rubyid_build_info'>build_info</span> <span class='rparen'>)</span> 
	<span class='id identifier rubyid_raise'>raise</span> <span class='const'>TypeError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_info'>build_info</span><span class='rbrace'>}</span><span class='tstring_content'> must be a PDEHeadlessBuildInfo</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_build_info'>build_info</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>PDEHeadlessBuildInfo</span> 
	<span class='id identifier rubyid_map_feature_id_plugins'>map_feature_id_plugins</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_feature_files'>parse_feature_files</span><span class='lparen'>(</span> <span class='id identifier rubyid_build_directory'>build_directory</span><span class='comma'>,</span> <span class='id identifier rubyid_build_info'>build_info</span> <span class='rparen'>)</span>
	<span class='comment'># svn_url, revision, plugin name, plugin version
</span>	<span class='id identifier rubyid_book_product'>book_product</span> <span class='op'>=</span> <span class='const'>Spreadsheet</span><span class='op'>::</span><span class='const'>Workbook</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> 
	<span class='id identifier rubyid_sheet'>sheet</span> <span class='op'>=</span> <span class='id identifier rubyid_book_product'>book_product</span><span class='period'>.</span><span class='id identifier rubyid_create_worksheet'>create_worksheet</span> <span class='symbol'>:name</span> <span class='op'>=&gt;</span> <span class='const'>PDEHeadlessUtil</span><span class='period'>.</span><span class='id identifier rubyid_get_now'>get_now</span> 

	<span class='id identifier rubyid_row'>row</span> <span class='op'>=</span> <span class='id identifier rubyid_sheet'>sheet</span><span class='period'>.</span><span class='id identifier rubyid_row'>row</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
	<span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>svn url</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
	<span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revision</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
	<span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>plugin name</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
	<span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>version</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
	
	<span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>=</span> <span class='int'>1</span>

	<span class='id identifier rubyid_build_info'>build_info</span><span class='period'>.</span><span class='id identifier rubyid_m_svn_infoes'>m_svn_infoes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_info'>info</span><span class='op'>|</span>
		<span class='id identifier rubyid_dir_plugin'>dir_plugin</span> <span class='op'>=</span> <span class='id identifier rubyid_info'>info</span><span class='period'>.</span><span class='id identifier rubyid_m_dir_plugins'>m_dir_plugins</span>
		
		<span class='id identifier rubyid_info'>info</span><span class='period'>.</span><span class='id identifier rubyid_m_feature_IDs'>m_feature_IDs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='op'>|</span>
			<span class='comment'>## TODO FIXME
</span>			<span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>PDEHeadlessUtil</span><span class='period'>.</span><span class='id identifier rubyid_correct_path'>correct_path</span><span class='lparen'>(</span><span class='id identifier rubyid_info'>info</span><span class='period'>.</span><span class='id identifier rubyid_m_url'>m_url</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dir_plugin'>dir_plugin</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
			<span class='id identifier rubyid_revision'>revision</span> <span class='op'>=</span> <span class='id identifier rubyid_info'>info</span><span class='period'>.</span><span class='id identifier rubyid_m_revision'>m_revision</span>

			<span class='id identifier rubyid_map_feature_id_plugins'>map_feature_id_plugins</span><span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_plugin'>plugin</span><span class='op'>|</span>
				<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_plugin'>plugin</span><span class='period'>.</span><span class='id identifier rubyid_m_plugin_id'>m_plugin_id</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_plugin'>plugin</span><span class='period'>.</span><span class='id identifier rubyid_m_build_version'>m_build_version</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
				<span class='id identifier rubyid_row'>row</span> <span class='op'>=</span> <span class='id identifier rubyid_sheet'>sheet</span><span class='period'>.</span><span class='id identifier rubyid_row'>row</span><span class='lparen'>(</span><span class='id identifier rubyid_row_index'>row_index</span><span class='rparen'>)</span>
				<span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='cvar'>@@Constants_int_svn_url</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span>	
				<span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='cvar'>@@Constants_int_revision</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_revision'>revision</span>
				<span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='cvar'>@@Constants_int_plugin_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_plugin'>plugin</span><span class='period'>.</span><span class='id identifier rubyid_m_plugin_id'>m_plugin_id</span>
				<span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='cvar'>@@Constants_int_plugin_version</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_plugin'>plugin</span><span class='period'>.</span><span class='id identifier rubyid_m_build_version'>m_build_version</span>
				<span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>=</span> <span class='id identifier rubyid_row_index'>row_index</span> <span class='op'>+</span> <span class='int'>1</span>
			<span class='kw'>end</span>

		<span class='kw'>end</span>

	<span class='kw'>end</span>
	<span class='id identifier rubyid_book_product'>book_product</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_sheet_filepath'>sheet_filepath</span>	
		
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="get_all_features-class_method">
  
    + (<tt>Array</tt>) <strong>get_all_features</strong>(feature_dir, feature_ids) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
获取所有feature.xml文件路径
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>feature_dir</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
    </li>
  
    <li>
      
        <span class='name'>feature_ids列表</span>
      
      
        <span class='type'>(<tt>Array</tt>)</span>
      
      
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


122
123
124
125
126
127
128</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'pde_headless_product_integration_generator.rb', line 122</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_all_features'>get_all_features</span><span class='lparen'>(</span> <span class='id identifier rubyid_feature_dir'>feature_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_feature_ids'>feature_ids</span> <span class='rparen'>)</span>
	<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
	<span class='id identifier rubyid_feature_ids'>feature_ids</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='op'>|</span>
		<span class='id identifier rubyid_result'>result</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_feature_dir'>feature_dir</span> <span class='op'>+</span> <span class='id identifier rubyid_id'>id</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/feature.xml</span><span class='tstring_end'>&quot;</span></span>
	<span class='kw'>end</span>
	<span class='kw'>return</span> <span class='id identifier rubyid_result'>result</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="get_bundle_version-class_method">
  
    + (<tt>String</tt>) <strong>get_bundle_version</strong>(plugin_file) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
获取METAFEST.MF中Bundle-Version版本
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>META-INF/MANIFEST.MF</span>
      
      
        <span class='type'>(<tt>File</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
文件
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
版本信息
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


109
110
111
112
113
114
115
116</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'pde_headless_product_integration_generator.rb', line 109</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_bundle_version'>get_bundle_version</span><span class='lparen'>(</span> <span class='id identifier rubyid_plugin_file'>plugin_file</span> <span class='rparen'>)</span> 
	<span class='id identifier rubyid_pattern'>pattern</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^Bundle-Version:(.*)$</span><span class='regexp_end'>/</span></span>
	<span class='kw'>while</span> <span class='lparen'>(</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_plugin_file'>plugin_file</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span> <span class='rparen'>)</span> 
		<span class='id identifier rubyid_matches'>matches</span> <span class='op'>=</span> <span class='id identifier rubyid_pattern'>pattern</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='rparen'>)</span>
		<span class='kw'>return</span> <span class='id identifier rubyid_matches'>matches</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_strip!'>strip!</span> <span class='kw'>if</span> <span class='id identifier rubyid_matches'>matches</span> <span class='op'>!=</span> <span class='kw'>nil</span>
	<span class='kw'>end</span>
	<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="get_feature_require_plugins-class_method">
  
    + (<tt>Array</tt>) <strong>get_feature_require_plugins</strong>(build_directory, feature_id) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
获取feature所需要的plugin信息
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>build_directory</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
编译目录路径
</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>feature_id</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
当前feature的id
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
feature_id指向的feature.xml所require的所有plugin
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'pde_headless_product_integration_generator.rb', line 86</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_feature_require_plugins'>get_feature_require_plugins</span><span class='lparen'>(</span> <span class='id identifier rubyid_build_directory'>build_directory</span><span class='comma'>,</span> <span class='id identifier rubyid_feature_id'>feature_id</span><span class='rparen'>)</span>
	<span class='id identifier rubyid_build_directory'>build_directory</span> <span class='op'>=</span> <span class='const'>PDEHeadlessUtil</span><span class='period'>.</span><span class='id identifier rubyid_correct_path'>correct_path</span> <span class='lparen'>(</span> <span class='id identifier rubyid_build_directory'>build_directory</span> <span class='rparen'>)</span> 
	<span class='id identifier rubyid_result_plugin_info'>result_plugin_info</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
	<span class='kw'>begin</span>	
		<span class='id identifier rubyid_feature_file'>feature_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_build_directory'>build_directory</span> <span class='op'>+</span> <span class='cvar'>@@Dir_name_features</span> <span class='op'>+</span> <span class='id identifier rubyid_feature_id'>feature_id</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/feature.xml</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
		<span class='id identifier rubyid_feature_doc'>feature_doc</span> <span class='op'>=</span> <span class='const'>Document</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_feature_file'>feature_file</span><span class='rparen'>)</span>
		<span class='id identifier rubyid_feature_doc'>feature_doc</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>feature/plugin</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_element'>element</span><span class='op'>|</span>
			<span class='id identifier rubyid_plugin_id'>plugin_id</span> <span class='op'>=</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>id</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
			<span class='id identifier rubyid_plugin_file'>plugin_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_build_directory'>build_directory</span> <span class='op'>+</span> <span class='cvar'>@@Dir_name_plugins</span> <span class='op'>+</span> <span class='id identifier rubyid_plugin_id'>plugin_id</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/META-INF/MANIFEST.MF</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
			<span class='id identifier rubyid_plugin_build_version'>plugin_build_version</span> <span class='op'>=</span> <span class='id identifier rubyid_get_bundle_version'>get_bundle_version</span><span class='lparen'>(</span><span class='id identifier rubyid_plugin_file'>plugin_file</span><span class='rparen'>)</span>
			<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>get version error</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_plugin_build_version'>plugin_build_version</span> <span class='op'>==</span> <span class='kw'>nil</span>
			<span class='id identifier rubyid_result_plugin_info'>result_plugin_info</span> <span class='op'>&lt;&lt;</span> <span class='const'>PluginInfo</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_plugin_id'>plugin_id</span><span class='comma'>,</span> <span class='id identifier rubyid_plugin_build_version'>plugin_build_version</span> <span class='rparen'>)</span>
			<span class='id identifier rubyid_plugin_file'>plugin_file</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
		<span class='kw'>end</span>
	<span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
		<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_e'>e</span>
	<span class='kw'>end</span>
	<span class='kw'>return</span> <span class='id identifier rubyid_result_plugin_info'>result_plugin_info</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_feature_files-class_method">
  
    + (<tt>Hashmap</tt>) <strong>parse_feature_files</strong>(build_directory, build_info) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
解析build_info中的feature.xml，返回一个map,map的key是feature_id,value是这个feature包含的所有插件的PluginInfo
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>build_directory</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
编译目录路径
</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>build_info</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="PDEHeadlessUtil/PDEHeadlessBuildInfo.html" title="PDEHeadlessUtil::PDEHeadlessBuildInfo (class)">PDEHeadlessBuildInfo</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
编译信息
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Hashmap</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
map
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


72
73
74
75
76
77
78
79
80</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'pde_headless_product_integration_generator.rb', line 72</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse_feature_files'>parse_feature_files</span><span class='lparen'>(</span> <span class='id identifier rubyid_build_directory'>build_directory</span> <span class='comma'>,</span> <span class='id identifier rubyid_build_info'>build_info</span> <span class='rparen'>)</span>
	<span class='id identifier rubyid_result_feature_id_plugin'>result_feature_id_plugin</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
	<span class='id identifier rubyid_build_info'>build_info</span><span class='period'>.</span><span class='id identifier rubyid_m_svn_infoes'>m_svn_infoes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_info'>info</span><span class='op'>|</span>	
		<span class='id identifier rubyid_info'>info</span><span class='period'>.</span><span class='id identifier rubyid_m_feature_IDs'>m_feature_IDs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_feature_id'>feature_id</span><span class='op'>|</span>
			<span class='id identifier rubyid_result_feature_id_plugin'>result_feature_id_plugin</span><span class='lbracket'>[</span><span class='id identifier rubyid_feature_id'>feature_id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_get_feature_require_plugins'>get_feature_require_plugins</span><span class='lparen'>(</span><span class='id identifier rubyid_build_directory'>build_directory</span> <span class='comma'>,</span><span class='id identifier rubyid_feature_id'>feature_id</span><span class='rparen'>)</span>
		<span class='kw'>end</span>
	<span class='kw'>end</span>
	<span class='kw'>return</span> <span class='id identifier rubyid_result_feature_id_plugin'>result_feature_id_plugin</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Mon Jan 30 13:37:16 2012 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.4 (ruby-1.9.2).
</div>

  </body>
</html>